home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
man
/
cmds.fmt
/
xgraph.man
< prev
next >
Wrap
Text File
|
1991-11-01
|
13KB
|
397 lines
XGRAPH User Commands XGRAPH
NNAAMMEE
xgraph - Draw a graph on an X11 Display
SSYYNNOOPPSSIISS
xxggrraapphh [ options ] [ =WxH+X+Y ] [ -display
host:display.screen ] [ file ... ]
DDEESSCCRRIIPPTTIIOONN
The _x_g_r_a_p_h program draws a graph on an X display given data
read from either data files or from standard input if no
files are specified. It can display up to 64 independent
data sets using different colors and/or line styles for each
set. It annotates the graph with a title, axis labels,
grid lines or tick marks, grid labels, and a legend. There
are options to control the appearance of most components of
the graph.
The input format is similar to _g_r_a_p_h(_1_G) but differs
slightly. The data consists of a number of _d_a_t_a _s_e_t_s. Data
sets are separated by a blank line. A new data set is also
assumed at the start of each input file. A data set con-
sists of an ordered list of points of the form "X Y". Each
point must appear on a separate line. The name of a data set
can be specified by a line which begins with a double quote
followed by the set name. An example input file with three
data sets is shown below (note set three is not named):
0.5 7.8
1.0 6.2
"set one
1.5 8.9
"set two
-3.4 1.4e-3
-2.0 1.9e-2
-0.65 2.2e-4
2.2 12.8
2.4 -3.3
2.6 -32.2
2.8 -10.3
After _x_g_r_a_p_h has read the data, it will create a new window
to graphically display the data. The interface used to
specify the size and location of this window depends on the
window manager currently in use. Refer to the reference
manual of the window manager for details.
Once the window has been opened, all of the data sets will
be displayed graphically (subject to the options explained
below) with a legend in the upper right corner of the
screen. To zoom in on a portion of the graph, depress a
Sprite v1.0 February 1, 1989 1
XGRAPH User Commands XGRAPH
mouse button in the window and sweep out a region. _x_g_r_a_p_h
will then open a new window looking at just that portion of
the graph. _x_g_r_a_p_h also presents two control buttons in the
upper left corner of each window: _C_l_o_s_e and _H_a_r_d_c_o_p_y. Win-
dows are closed by depressing a mouse button while the mouse
cursor is inside the _C_l_o_s_e button. Typing EOF (control-D)
in a window also closes that window. Depressing a mouse
button while the mouse cursor is in the _H_a_r_c_o_p_y button
causes a dialog to appear asking about hardcopy (printout)
options. These options are described below:
Output Device
Specifies the type of the output device (e.g. "HPGL",
"Postscript", etc). An output device is chosen by
depressing the mouse inside its name. The default
values of other fields will change when you select a
different output device.
Disposition
Specifies whether the output should go directly to a
device or to a file. Again, the default values of
other fields will change when you select a different
disposition.
File or Device Name
If the disposition is "To Device", this field speci-
fies the device name. A device name is the same as the
name given for the -P command of lpr(1). If the dispo-
sition is "To File", this field specifies the name of
the output file.
Maximum Dimension
This specifies the maximum size of the plot on the
hardcopy device in centimeters. _x_g_r_a_p_h takes in
account the aspect ratio of the plot on the screen and
will scale the plot so that the longer side of the plot
is no more than the value of this parameter. If the
device supports it, the plot may also be rotated on
the page based on the value of the maximum dimension.
Title Font Family
This field specifies the name of a font to use when
drawing the graph title. Suitable defaults are ini-
tially chosen for any given hardcopy device. The value
of this field is hardware specific -- refer to the dev-
ice reference manual for details.
Title Font Size
This field specifies the desired size of the title
fonts in points (1/72 of an inch). If the device sup-
ports scalable fonts, the font will be scaled to this
size.
Sprite v1.0 February 1, 1989 2
XGRAPH User Commands XGRAPH
Axis Font Family and Axis Font Size
These fields are like _T_i_t_l_e _F_o_n_t _F_a_m_i_l_y and _T_i_t_l_e _F_o_n_t
_S_i_z_e except they specify values for the font _x_g_r_a_p_h
uses to draw axis labels, and legend descriptions.
Control Buttons
After specifing the parameters for the plot, the "Ok"
button causes _x_g_r_a_p_h to produce a hardcopy. Pressing
the "Cancel" button will abort the hardcopy operation.
_x_g_r_a_p_h accepts a large number of options most of which can
be specified either on the command line or in the user's
~/.Xdefaults file. A list of these options is given below.
The command line option is specified first with its X
default name (if any) in parenthesis afterward. The format
of the option in the X defaults file is "program.option:
value" where program is the program name (xgraph) and the
option name is the one specified below. Note that the value
of a flag in the X defaults file must be "1".
--<<ddiiggiitt>> <<nnaammee>>
These options specify the data set name for the
corresponding data set. The digit should be in the
range '0' to '63'. This name will be used in the
legend.
--bb Force _x_g_r_a_p_h to output the graph in black and white
(even if the display is color). This is useful for
those using _x_w_d(_1) to produce hardcopies of the graph.
--bbaarr Specifies that vertical bars should be drawn from the
data points to a base point which can be specified with
-brb. Usually, the -nl flag is used with this option.
The point itself is located at the center of the bar.
--bbbb ((BBoouunnddBBooxx))
Draw a bounding box around the data region. This is
very useful if you prefer to see tick marks rather than
grid lines (see -tk).
--bbdd <<ccoolloorr>> ((BBoorrddeerr))
This specifies the border color of the _x_g_r_a_p_h window.
--bbgg <<ccoolloorr>> ((BBaacckkggrroouunndd))
Background color of the _x_g_r_a_p_h window.
--bbrrbb <<bbaassee>>
This specifies the base for a bar graph. By default,
the base is zero.
--bbrrww <<wwiiddtthh>>
This specifies the width of bars in a bar graph. The
Sprite v1.0 February 1, 1989 3
XGRAPH User Commands XGRAPH
amount is specified in the user's units. By default,
a bar one pixel wide is drawn.
--bbww <<ssiizzee>> ((BBoorrddeerrSSiizzee))
Border width (in pixels) of the _x_g_r_a_p_h window.
--ffgg <<ccoolloorr>> ((FFoorreeggrroouunndd))
Foreground color. This color is used to draw all text
and the normal grid lines in the window.
--llff <<ffoonnttnnaammee>> ((LLaabbeellFFoonntt))
Label font. All axis labels and grid labels are drawn
using this font. It must be a fixed-width font.
--llnnxx Specifies a logarithmic X axis. Grid labels represent
powers of ten.
--llnnyy Specifies a logarithmic Y axis. Grid labels represent
powers of ten.
--llww wwiiddtthh
Specifies the width of the data lines in pixels. The
default is one.
--llxx <<xxll,,xxhh>>
This option limits the range of the X axis to the
specified interval. This (along with -ly) can be used
to "zoom in" on a particularly interesting portion of a
larger graph.
--llyy <<yyll,,yyhh>>
This option limits the range of the Y axis to the
specified interval.
--mm ((MMaarrkkeerrss))
Mark each data point with a distinctive marker. There
are eight distinctive markers used by xgraph. These
markers are assigned uniquely to each different line
style on black and white machines and varies with each
color on color machines.
--MM ((SSttyylleeMMaarrkkeerrss))
Similar to -m but markers are assigned uniquely to each
eight consecutive data sets (this corresponds to each
different line style on color machines).
--nnll ((NNooLLiinneess))
Turn off drawing lines. When used with -m, this can
be used to produce scatter plots. When used with -bar,
it can be used to produce standard bar graphs.
--pp ((PPiixxeellMMaarrkkeerrss,, SSmmaallllPPiixxeellss))
Sprite v1.0 February 1, 1989 4
XGRAPH User Commands XGRAPH
Marks each data point with a small marker (pixel
sized). This is usually used with the -nl option for
scatter plots.
--PP ((LLaarrggeePPiixxeellss))
Similar to -p but marks each pixel with a large dot.
--rrvv ((RReevveerrsseeVViiddeeoo))
Reverse video. On black and white displays, this will
invert the foreground and background colors. It does
nothing on color displays.
--ss ((SSpplliinnee))
This option specifies the lines should be drawn as
spline curves. Currently, this is implemented using
the X spline option which fits only three points at a
time. Thus, the effect is not what you might expect.
--tt <<ssttrriinngg>>
Title of the plot. This string is centered at the top
of the graph.
--ttff <<ffoonnttnnaammee>> ((TTiittlleeFFoonntt))
Title font. This is the name of the font to use for
the graph title. It defaults to 9x15.
--ttkk ((TTiicckkss))
This option causes _x_g_r_a_p_h to draw tick marks rather
than full grid lines. The -bb option is also useful
when viewing graphs with tick marks only.
--xx <<uunniittnnaammee>>
This is the unit name for the X axis. Its default is
"X".
--yy <<uunniittnnaammee>>
This is the unit name for the Y axis. Its default is
"Y".
--zzgg <<ccoolloorr>> ((ZZeerrooCCoolloorr))
This is the color used to draw the zero grid line.
Some options can only be specified in the X defaults file.
These options are described below:
<<ddiiggiitt>>..CCoolloorr
Specifies the color for a data set. Eight independent
colors can be specified. Thus, the digit should be
between '0' and '7'. If there are more than eight data
sets, the colors will repeat but with a new line style
(see below).
Sprite v1.0 February 1, 1989 5
XGRAPH User Commands XGRAPH
<<ddiiggiitt>>..SSttyyllee
Specifies the line style for a data set. A sixteen-bit
integer specifies the sixteen-bit pattern used for the
line style. Eight independent line styles can be
specified. Thus, the digit should be between '0' and
'7'. If there are more than eight data sets, these
styles will be reused. On color workstations, one
line style is used for each of eight colors. Thus, 64
unique data sets can be displayed.
GGrriiddSSiizzee
Width, in pixels, of normal grid lines.
GGrriiddSSttyyllee
Line style pattern of normal grid lines.
ZZeerrooSSiizzee
Width, in pixels, of the zero grid line.
ZZeerrooSSttyyllee
Line style pattern of the zero grid line.
AAUUTTHHOORR
David Harrison University of California
Sprite v1.0 February 1, 1989 6